From f0309906f0c55ef408e039d60955fc5dd14eca3b Mon Sep 17 00:00:00 2001 From: "emellor@leeni.uk.xensource.com" Date: Wed, 30 Nov 2005 18:48:27 +0000 Subject: [PATCH] Don't refuse to clean up after a domain death when the buffer is not empty. If the domain has gone away, then no-one can attach to the pty because Xend will have cleaned up the entries in the store, so the pty will never become ready to write. The buffer will never get emptied, so cleanup will never occur. This leaks ptys, file descriptors, and memory. Simply throw those data away instead. Signed-off-by: Ewan Mellor --- tools/console/daemon/io.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c index 80e76c416e..9aae032680 100644 --- a/tools/console/daemon/io.c +++ b/tools/console/daemon/io.c @@ -376,9 +376,6 @@ static void remove_domain(struct domain *dom) static void cleanup_domain(struct domain *d) { - if (!buffer_empty(&d->buffer)) - return; - if (d->tty_fd != -1) { close(d->tty_fd); d->tty_fd = -1; -- 2.30.2